using System.Collections.Generic;

namespace Core
{
    public partial class NumbericConfigLoader
    {
        private Dictionary<int, NumbericConfig> numbericNumDict = new Dictionary<int, NumbericConfig>();
        protected override void OnEndLoad()
        {
            foreach (var item in dict.Values)
            {
                var config = item as NumbericConfig;
                numbericNumDict[config.value] = config;
            }
        }

        public new NumbericConfig Get(int value)
        {
            numbericNumDict.TryGetValue(value, out var config);
            return config;
        }
    }
}